Creates one or many temporary variables. The variables will exist only while the procedure containing the let instruction and procedures called by this procedure are running. The input is a list of paired variable names and values. Let can only be used in a procedure. See local.
Example:
to move
let [dist 100 head 90 delay 300]
right :head
wait :delay
fd :dist
end
Try the procedure in the Command Center. The turtle will move. When the procedure is over, check the value of the variables. Variables have lost their values. They don't even exist.
move
show :dist
dist has no value
The instruction let [dist 100 head 90 delay 300] is equivalent to: